package com.sunwayworld.basemodule.business.pjreport.resource;

import com.sunwayworld.basemodule.business.pjreport.bean.LimsPjReportBean;
import com.sunwayworld.basemodule.business.pjreport.service.LimsPjReportService;
import com.sunwayworld.basemodule.business.report.bean.LimsReportBean;
import com.sunwayworld.basemodule.business.report.service.LimsReportService;
import com.sunwayworld.framework.log.annotation.Log;
import com.sunwayworld.framework.log.annotation.LogType;
import com.sunwayworld.framework.support.auditable.resource.GenericAuditableResource;
import com.sunwayworld.framework.support.base.resource.GenericResource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@RequestMapping("/secure/basemodule/business/pj-reports")
public interface LimsPjReportResource extends GenericResource<LimsPjReportService, LimsPjReportBean, Long>, GenericAuditableResource<LimsPjReportService, LimsPjReportBean, Long> {

    @Log(value = "批量生成报告", type = LogType.UPDATE)
    @RequestMapping(value = "/create/reports", method = RequestMethod.GET)
    void createReports(String ids);

    @Log(value = "报告在线预览", type = LogType.SELECT)
    @RequestMapping(value = "/preview-online/reports", method = RequestMethod.GET)
    void previewOnlineReports(String ids, HttpServletRequest request, HttpServletResponse response);

    @Log(value = "报告下载", type = LogType.SELECT)
    @RequestMapping(value = "/download/reports", method = RequestMethod.GET)
    String downloadReports(String ids, HttpServletRequest request, HttpServletResponse response);

    @Log(value = "报告按姓名分组合并后下载---搬运自华大", type = LogType.SELECT)
    @RequestMapping(value = "/reports/group-merge/download", method = RequestMethod.GET)
    String reportsGroupMergeDownload(String ids, String type, HttpServletRequest request, HttpServletResponse response);

}
